package com.hxzon.project;

public class Page {
	private long currentPage = 1;
	private long pageSize = 50;
	private long rowCount = 0;
//	protected long pagecount = 0;

	public long getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(long currentpage) {
		this.currentPage = currentpage;
	}
	
	public long getCurrentRow() {
		return (currentPage - 1) * pageSize;
	}

	public void setCurrentRow(long currentpage) {
//		this.currentpage = currentpage;
	}

	public long getPageSize() {
		return pageSize;
	}

	public void setPageSize(long pagesize) {
		this.pageSize = pagesize;
	}

	public long getRowCount() {
		return rowCount;
	}

	public void setRowCount(long rowcount) {
		this.rowCount = rowcount;
	}

	public long getPageCount() {
		return (rowCount + pageSize - 1) / pageSize;
	}

	public void setPageCount(long pagecount) {
//		this.pagecount = pagecount;
	}
	
	public String toString(){
		return "currentPage:"+this.currentPage+";pageSize:"+this.pageSize;
	}
}
